/********************************************************************************
 * Copyright (C) 2018 TypeFox and others.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the Eclipse
 * Public License v. 2.0 are satisfied: GNU General Public License, version 2
 * with the GNU Classpath Exception which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
 ********************************************************************************/

:root {
  --theia-search-box-padding: 3px;
  --theia-search-box-radius: 2px;
  --theia-search-box-spacing: 4px;
  --theia-search-box-max-width: 500px;
}

.theia-search-box {
  position: absolute;
  display: flex;
  top: var(--theia-search-box-spacing);
  right: var(--theia-search-box-spacing);
  box-shadow: var(--theia-border-width) var(--theia-border-width)
    var(--theia-widget-shadow);
  background-color: var(--theia-listFilterWidget-background);
  z-index: calc(var(--theia-tabbar-toolbar-z-index) + 1);
  border-radius: var(--theia-search-box-radius);
  padding: var(--theia-search-box-padding);
  border: var(--theia-border-width) solid rgba(0, 0, 0, 0);
}

.theia-search-box.no-match {
  border: var(--theia-border-width) solid
    var(--theia-inputValidation-errorBorder);
}

.theia-search-input {
  flex-grow: 1;
  user-select: none;
}

.theia-search-box > .theia-search-buttons-wrapper {
  max-width: 0px;
  transition: max-width 0.2s ease-out;
  display: flex;
  box-sizing: border-box;
  align-items: center;
}

.theia-search-box:hover > .theia-search-buttons-wrapper {
  max-width: var(--theia-search-box-max-width);
  transition: max-width 0.2s ease-in;
}

.theia-search-button {
  min-width: 1rem;
  text-align: center;
  flex-grow: 0;
  font-family: FontAwesome;
  font-size: calc(var(--theia-content-font-size) * 0.8);
  color: var(--theia-editorWidget-foreground);
}

.theia-search-button.codicon.codicon-filter {
  color: var(--theia-editorWidget-foreground);
  align-self: flex-end;
  margin-left: var(--theia-search-box-spacing);
}

.theia-search-button.codicon-filter:not(.filter-active):before {
  content: "\eb85";
}

.theia-search-button.codicon-filter.filter-active:before {
  content: "\eb83";
}

.theia-search-button-next:before {
  content: "\f107";
}

.theia-search-button-next:hover,
.theia-search-button-previous:hover,
.theia-search-button-close:hover,
.theia-search-button.codicon-filter:hover {
  cursor: pointer;
}

.theia-search-button-next:hover:before {
  content: "\f107";
}

.theia-search-button-previous:before {
  content: "\f106";
}

.theia-search-button-previous:hover:before {
  content: "\f106";
}

.theia-search-button-close:before {
  content: "\f00d";
}

.theia-search-button-close:hover:before {
  content: "\f00d";
}

.theia-non-selectable {
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
  cursor: default;
}
